package com.xuwang.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @ClassName SupervisoryCheckDto
 * @Description TODO
 * @Author OuJunchen
 * @Date 2021/9/24 上午8:50
 * @Version 1.0
 */
public class SupervisoryCheckDto {
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    private Integer id;

    /**
     * 检查单位
     */
    @ApiModelProperty(value = "检查单位")
    private String companyName;

    /**
     * 所在区域
     */
    @ApiModelProperty(name = "area",notes = "所在区域",dataType = "String",required = true)
    private String area;

    /**
     * 检查时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    // 下面是服务器响应返回的内容，如果没有格式化转换，那么返回的内容是长毫秒数，接收mysql数据库中的数据也需要设置东八区+8时
    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "检查时间")
    private Date checkTime;

    /**
     * 检查类型
     */
    @ApiModelProperty(value = "检查类型")
    private Integer checkType;

    /**
     * 动态等级
     */
    @ApiModelProperty(value = "动态等级")
    private Integer dynamicRank;

    /**
     * 检查人（政府工作人员）
     */
    @ApiModelProperty(value = "检查人（政府工作人员）")
    private String name;

    /**
     * 问题内容
     */
    @ApiModelProperty(value = "问题内容")
    private String problem;

    /**
     * 意见
     */
    @ApiModelProperty(value = "意见")
    private String opinion;

    /**
     * 其他
     */
    @ApiModelProperty(value = "其他")
    private String other;

    /**
     * 附件（监督检查记录）
     */
    @ApiModelProperty(value = "附件（监督检查记录）")
    private String appendix;

    @Override
    public String toString () {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"id\":")
                .append(id);
        sb.append(",\"companyName\":\"")
                .append(companyName).append('\"');
        sb.append(",\"area\":\"")
                .append(area).append('\"');
        sb.append(",\"checkTime\":\"")
                .append(checkTime).append('\"');
        sb.append(",\"checkType\":")
                .append(checkType);
        sb.append(",\"dynamicRank\":")
                .append(dynamicRank);
        sb.append(",\"name\":\"")
                .append(name).append('\"');
        sb.append(",\"problem\":\"")
                .append(problem).append('\"');
        sb.append(",\"opinion\":\"")
                .append(opinion).append('\"');
        sb.append(",\"other\":\"")
                .append(other).append('\"');
        sb.append(",\"appendix\":\"")
                .append(appendix).append('\"');
        sb.append('}');
        return sb.toString();
    }

    public Integer getId () {
        return id;
    }

    public void setId (Integer id) {
        this.id = id;
    }

    public String getCompanyName () {
        return companyName;
    }

    public void setCompanyName (String companyName) {
        this.companyName = companyName;
    }

    public String getArea () {
        return area;
    }

    public void setArea (String area) {
        this.area = area;
    }

    public Date getCheckTime () {
        return checkTime;
    }

    public void setCheckTime (Date checkTime) {
        this.checkTime = checkTime;
    }

    public Integer getCheckType () {
        return checkType;
    }

    public void setCheckType (Integer checkType) {
        this.checkType = checkType;
    }

    public Integer getDynamicRank () {
        return dynamicRank;
    }

    public void setDynamicRank (Integer dynamicRank) {
        this.dynamicRank = dynamicRank;
    }

    public String getName () {
        return name;
    }

    public void setName (String name) {
        this.name = name;
    }

    public String getProblem () {
        return problem;
    }

    public void setProblem (String problem) {
        this.problem = problem;
    }

    public String getOpinion () {
        return opinion;
    }

    public void setOpinion (String opinion) {
        this.opinion = opinion;
    }

    public String getOther () {
        return other;
    }

    public void setOther (String other) {
        this.other = other;
    }

    public String getAppendix () {
        return appendix;
    }

    public void setAppendix (String appendix) {
        this.appendix = appendix;
    }
}
